#include <signal.h>
#include <stdio.h>
#include <unistd.h>

void func(int);

int main(int argc, const char **argv) {
  printf("pid = %d\n", getpid());
  /*for (int i = 0; i < 30; i++) {
    signal(i + 1, func);
  }*/

  signal(2,func);

  while (1)
  {
    sleep(1);
  }

  return 0;
}

void func(int num) {
  printf("This is %d signal\n", num);
}

